# 创建一个简单的字典
person = {"name": "freedom", "age": 5}
print(person)
print(person["name"])
print(person["age"])

# 添加键值对
person["school"] = "大力小学"
print(person["school"])

# 修改字典中的值
person["age"] = 20
print(person["age"])

# 删除字典中的键值对
del person["school"]
print(person)

# 多行定义键值对
ages = {
	"小王": 20,
	"小李": 13
}
print(ages)

# 获取字典中的值
print(person.get("name"))
print(person.get("school"))
print(person.get("name", "幸福小学"))
print(person.get("school", "幸福小学"))
